<template>
  <a-drawer
    width="384"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{height:'calc(100vh - 100px)',overflow:'auto'}"
    @close="cancel">
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32">
          <a-col :span="24">
            <a-form-model-item label="商品名称" prop="goodsname">
              <a-input v-model="form.goodsname" placeholder="请输入商品名称"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="仓库名称" prop="warehousename">
              <a-input v-model="form.warehousename" placeholder="请输入仓库名称"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="供应商名称" prop="suppliername">
              <a-input v-model="form.suppliername" placeholder="请输入供应商名称"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="采购数量" prop="count">
              <a-input v-model="form.count" placeholder="请输入采购数量"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="采购总金额" prop="amount">
              <a-input v-model="form.amount" placeholder="请输入采购总金额"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="采购时间" prop="purchaseTime">
              <a-input v-model="form.purchaseTime" placeholder="请输入采购时间"/>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button :disabled="disabled" @click="cancel">
            取消
          </a-button>
          <a-button type="primary" :disabled="disabled" @click="submitForm(true)">
            保存
          </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BusPurchaseEditForm from './BusPurchaseForm'
export default {
  ...BusPurchaseEditForm
}
</script>
